package com.fiveGroup.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fiveGroup.pojo.OrderInfo;
import com.fiveGroup.pojo.vo.BuyerOrderVo;
import com.fiveGroup.pojo.vo.OrderDetailVo;
import com.fiveGroup.pojo.vo.SellerOrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {
    /**
     * 查询买家订单（多表联查）
     */
    List<BuyerOrderVo> selectBuyerOrders(Page<BuyerOrderVo> page, @Param(Constants.WRAPPER) QueryWrapper<BuyerOrderVo> wrapper);

    /**
     * 查询卖家订单（多表联查）
     */
    List<SellerOrderVo> selectSellerOrders(Page<SellerOrderVo> page, @Param(Constants.WRAPPER) QueryWrapper<BuyerOrderVo> wrapper);

    //查询指定订单详细信息(买卖家通用)
    OrderDetailVo getOrderDetail(Long orderId);

}